package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.StrategyCommentReply;
import cn.wolfcode.trip.base.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 攻略点评的评论mapper接口
 */
public interface StrategyCommentReplyMapper {
    int deleteByPrimaryKey(Long id);

    int insert(StrategyCommentReply record);

    StrategyCommentReply selectByPrimaryKey(Long id);

    int updateByPrimaryKey(StrategyCommentReply record);

    List<StrategyCommentReply> selectAll();

    List<StrategyCommentReply> selectForList(QueryObject qo);

    /**
     * 改变点评评论的发布状态
     * @param id
     * @param state
     */
    void changeReplyState(@Param("id") Long id, @Param("state") Integer state);

    /**
     * 根据点评id查询评论数量
     * @param strategyCommentId
     * @return
     */
    int getCountByStrategyCommentId(Long strategyCommentId);
}